-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor tidy up in the release manifest generation script #147
Conversation
The idea being that it's more compact this way, rather than defining a reusable value that is only ever used once.
// "x64": { | ||
// "sha": "abcdef1234567890", | ||
// "url": "https://cdn.a8c-ci.services/studio/studio-win32-x64-abcdef1234567890.exe.zip" | ||
// } | ||
// "sha": "abcdef1234567890", | ||
// "url": "https://cdn.a8c-ci.services/studio/studio-win32-x64-abcdef1234567890.exe.zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no additional architecture sub-level for the Windows builds.
const releaseVersionZipFilenameMac = `https://cdn.a8c-ci.services/studio/studio-darwin-v${ version }.app.zip`; | ||
const releaseVersionZipFilenameX64 = `https://cdn.a8c-ci.services/studio/studio-darwin-x64-v${ version }.app.zip`; | ||
const releaseVersionZipFilenameArm64 = `https://cdn.a8c-ci.services/studio/studio-darwin-arm64-v${ version }.app.zip`; | ||
const releaseVersionZipFilenameWin32 = `https://cdn.a8c-ci.services/studio/studio-win32-v${ version }.exe`; | ||
|
||
releasesData[ version ] = releasesData[ version ] ?? {}; | ||
|
||
// macOS | ||
releasesData[ version ][ 'darwin' ] = releasesData[ version ][ 'darwin' ] ?? {}; | ||
releasesData[ version ][ 'darwin' ][ 'universal' ] = { | ||
sha: currentCommit, | ||
url: releaseVersionZipFilenameMac, | ||
url: `${ cdnURL }/${ baseName }-darwin-v${ version }.app.zip`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal take: It's cleaner to inline these URL definitions since they are only ever used once.
// "url": "https://cdn.a8c-ci.services/studio/studio-win32-x64-abcdef1234567890.exe.zip" | ||
// } | ||
// "sha": "abcdef1234567890", | ||
// "url": "https://cdn.a8c-ci.services/studio/studio-win32-abcdef1234567890.exe.zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for fixing the example according the implementation.
I've added https://github.com/Automattic/dotcom-forge/issues/7317 to add support for Windows in the updates endpoint.
Proposed Changes
Today, I looked at the manifest script as the base for a similar functionality in another app. I noticed a minor error in the documentation and a few opportunities to improve the maintainability.
Testing Instructions
Run
node ./scripts/generate-releases-manifest.mjs
and ensureout/releases.json
is modified as expected.Pre-merge Checklist